package com.example.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.ManyMany;
import org.nutz.dao.entity.annotation.Table;

/**
 * <p>
 * 系统用户
 * </p>
 *
 * @author lilufeng
 * @since 2016-11-28
 */
@Table("sys_user")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
    @Id
	private Long id;

	/**
	 * 用户名
	 */
    @Column
	private String username;

	/**
	 * 密码
	 */
	@Column
	private String password;

	/**
	 * 邮箱
	 */
	@Column
	private String email;

	/**
	 * 手机号
	 */
	@Column
	private String mobile;

	/**
	 * 状态  0：禁用   1：正常
	 */
	@Column
	private Integer status;

	/**
	 * 创建时间
	 */
	@Column(value = "create_time")
	private Date createTime;

	/**
	 * 
	 */
	@Column(value = "update_time")
	private Date updateTime;

	@ManyMany(relation = "sys_user_role", from = "user_id", to = "role_id")
	private List<SysRole> sysRoles;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public List<SysRole> getSysRoles() {
		return sysRoles;
	}

	public void setSysRoles(List<SysRole> sysRoles) {
		this.sysRoles = sysRoles;
	}

}
